home *** CD-ROM | disk | FTP | other *** search
- /* */
-
- l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
- if AddLibrary("rxmui.library")~=0 then exit
-
- lv.list="l"
- lv.input=1
- lv.frame="INPUTLIST"
- l.format="COL=0 BAR,COL=1"
- l.0="Alfonso|1"
- l.1="Paolo|2"
- l.2="Emi|3"
- res=newobj("listview","lv")
- if res~=0 then call err(res)
-
- app.Title="ListExample"
- app.Version="$VER: ListExample 1.0 (22.11.99)"
- app.Copyright="©1999, alfie"
- app.Author="alfie"
- app.Description="List Example"
- app.Base="SHOW"
- app.SubWindow="WIN"
- win.Title="ListExample"
- win.ID="SHOW"
- win.Contents="MGROUP"
- mgroup.0="lv"
- mgroup.1="G"
- g.class="GROUP"
- g.horiz=1
- g.0=Button("SORT","_Sort")
- g.1=Button("ADD","_Add")
- g.2=Button("REMOVE","_Remove")
- mgroup.2="GG"
- gg.class="GROUP"
- gg.horiz=1
- sa.reject="|";gg.0=String("SA")
- sb.reject="|";gg.1=String("SB")
-
- res=NewObj("application","app")
- if res~=0 then call err(res)
-
- res=Notify("win","closerequest",1,"app","returnid","quit")
- if res~=0 then call err(res)
-
- res=Notify("sort","pressed",0,"lv","sort")
- if res~=0 then call err(res)
-
- res=Notify("add","pressed",0,"lv","insert","","bottom")
- if res~=0 then call err(res)
-
- res=Notify("add","pressed",0,"lv","set","active","bottom")
- if res~=0 then call err(res)
-
- res=Notify("remove","pressed",0,"lv","remove","active")
- if res~=0 then call err(res)
-
- res=Notify("lv","activeentry","everytime","app","returnid")
- if res~=0 then call err(res)
-
- res=Notify("lv","active",-1,"sa","set","contents","")
- if res~=0 then call err(res)
-
- res=Notify("lv","active",-1,"sb","set","contents","")
- if res~=0 then call err(res)
-
- res=Notify("lv","activeentry0","everytime","sa","set","contents","triggervalue")
- if res~=0 then call err(res)
-
- res=Notify("lv","activeentry1","everytime","sb","set","contents","triggervalue")
- if res~=0 then call err(res)
-
- res=Notify("sa","newcontents","everytime","lv","replacecol","active",0,"triggervalue")
- if res~=0 then call err(res)
-
- res=Notify("sb","newcontents","everytime","lv","replacecol","active",1,"triggervalue")
- if res~=0 then call err(res)
-
- call set("lv","active",0)
-
- res=set("win","defaultobject","lv")
- if res~=0 then call err(res)
-
- res=set("win","open",1)
- if res~=0 then call err(res)
-
- s=0
- do forever
- call handle("APP","H",s)
- do i=0 to h.num-1
- say h.num-1 h.i
- if h.i="QUIT" then exit
- end
- s=Wait(or(h.signals,2**12))
- if and(s,2**12)~=0 then exit
- end
- exit
-
- err: procedure expose sigl
- parse arg res
- say getrxmuistring(res) "in line" sigl-1
- exit
-